import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// import './assets/js/rem'
/* import Vant from 'vant'
import 'vant/lib/index.css'
Vue.use(Vant) */
import Img from './assets/imgs/loading.gif'

// 引入字体图标
import './assets/fonts/iconfont.css'
import { Button, Icon, Tabbar, TabbarItem, Swipe, SwipeItem, Grid, GridItem, PullRefresh, NavBar, GoodsAction, GoodsActionIcon, GoodsActionButton, Popup, Card, Stepper, Checkbox, SwipeCell, SubmitBar, Form, Field, AddressList, AddressEdit, Lazyload, Search, Overlay } from 'vant'
import axios from 'axios'
import loading from 'plugins/loading'
Vue.use(loading)
Vue.prototype.$http = axios
Vue.use(Button)
  .use(Icon)
  .use(Tabbar)
  .use(TabbarItem)
  .use(Swipe)
  .use(SwipeItem)
  .use(Grid)
  .use(GridItem)
  .use(PullRefresh)
  .use(NavBar)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Popup)
  .use(Card)
  .use(Stepper)
  .use(Checkbox)
  .use(SwipeCell)
  .use(SubmitBar)
  .use(Form)
  .use(Field)
  .use(AddressList)
  .use(AddressEdit)
  .use(Lazyload, {
    loading: Img,
    error: Img,
    preload: '1',
    attempt: 2
  })
  .use(Search)
  .use(Overlay)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
